#include <stdio.h>

typedef struct __account_t {
	double balance;
	int login_cnt;
} account_t;

void withdraw(account_t *acc, double amt) {
	if (acc->balance > amt) {
    	acc->balance -= amt;
    }
}

void login_stat(account_t *acc) {	
	acc->login_cnt++;
}

int main() {
	account_t acc;
	acc.balance = 100;
	
	login_stat(&acc);
	withdraw(&acc, 20);
	
	printf("余额：%f\n", acc.balance);	
}
